README

This code is intended to replicate the figures and tables within the main text and the appendix of Garrett Baker, David S. Kirk, and Robert J. Sampson, “The Great Leveler? Juvenile Arrest, College Attainment, and the Future of American Inequality,” Sociology of Education 99, no. 1 (2026). 

The data used for this analysis contains confidential arrest records and personally identifiable information that can potentially be used to identify study participants, so the underlying data files are not shared in this replication repository. The code is intended to address any questions of methods and variables used. For more information on the PHDCN+ data or to request access, see https://sites.harvard.edu/phdcn/. 

There are three files to run: analysis_repo.do, cbps_repo.Rmd, and figures_repo.Rmd. Instructions for each file can be found below. 

INSTRUCTIONS
analysis_repo.do
   1. Install commands: If regsave and firthlogic are not already installed in Stata, run the following commands: “ssc install regsave” and “ssc install firthlogit”
   2. Update all instances of "filepath/" to the correct pathname 
   3. Run code in order

cbps_repo.Rmd 
   1. Install required packages
   2. Update all instances of "filepath/" to the correct pathname 
   3. Run code in order

figures_repo.Rmd 
   1. Install required packages
   2. Update all instances of "filepath/" to the correct pathname 
   3. Run code in order

OUTPUTS
analysis_repo.do
* Table 1: All models except model 4
* Table 2
* Table 3
* Table 4
* Table 5
* Table S1
* Table S2: All models except model 4
* Table S3: All models except model 4
* Table S4: All models except model 4
* Data files used in figures_repo.Rmd 

cbps_repo.Rmd 
* Figure S1
* Table 1: Model 4
* Table S2: Model 4
* Table S3: Model 4
* Table S4: Model 4

figures_repo.Rmd
* Figure 1
* Figure 2
* Figure 3
* Figure S2
* Figure S3
* Figure S4